package j02jicheng;

public class J3fuzhi {
}
class Animal{
    String name;
    int age;


}
class Dog extends Animal{
    String kind;

    public Dog(String kind) {
        this.kind = kind;
    }
    public Dog(String kind,String name,int age) {
        this.kind = kind;

        this.name = name;
        this.age = age;
    }

    public void say(){
        System.out.println(name);
        System.out.println(age);
        System.out.println(kind);
    }
}

class DogTest{
    public static void main(String[] args) {
        Dog d1 = new Dog("拉布拉多");
        System.out.println("d1.name = " + d1.name);
        System.out.println("d1.kind = " + d1.kind);


        Dog d2 = new Dog("田园犬","旺财",2);
        System.out.println("d2.name = " + d2.name);
        System.out.println("d2.kind = " + d2.kind);
        System.out.println("====");
        d2.say();
    }
}